package com.zixuan.gulicollege.eduservice.client;

import com.zixuan.gulicollege.common_utils.R;
import com.zixuan.gulicollege.eduservice.client.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName VodClient
 * @Author by zixuan
 * @Date 2021/5/14 15:13
 */

@FeignClient(value = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    /**
     * 删除视频接口
     * @param id
     * @return
     */
    @DeleteMapping("/edu_vod/video/removeAliyunVideo/{id}")
    R deleteAliyunVideo(@PathVariable("id") String id);


    /**
     * 批量删除视频
     * @param videoListId
     * @return
     */
    @DeleteMapping("/edu_vod/video/deleteBatch")
    R deleteBatch(@RequestParam("videoListId") List<String> videoListId);

    /**
     * 获取视频播放凭证
     * @param id
     * @return
     */
    @GetMapping("/edu_vod/getPlayAuth/{id}")
    R getPlayAuth(@PathVariable String id);

}
